#include<stdio.h>

void sort(int iArray[], int count)
{
    int pos, tmp;
    for(int i = 0; i < count; i++)
    {
        pos = i;
        while(pos && iArray[pos] < iArray[pos-1])
        {
            tmp = iArray[pos];
            iArray[pos] = iArray[pos-1];
            iArray[pos-1] = tmp;
            pos--;
        }
    }
    return;
}

int main()
{
    int array[] = { 122, 545, 49, 378, 73, 481, 34, 87, 384, 348, 454, 48, 648 };
    printf("The count of array:%lu\n", sizeof(array)/sizeof(int));
    for(int k = 0;;k++)
    {
        for(int j = 0; j < sizeof(array)/sizeof(int); j++)
            printf("%d ", array[j]);
        putchar('\n');
        if(k)
            break;
        sort(array, sizeof(array)/sizeof(int));
    }
    return 0;
}
